<%@page import="RssEasy.Core.UploadFileThumbHelper"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%
    response.addHeader("Access-Control-Allow-Origin", "*");
    UploadFileThumbHelper upfile = new UploadFileThumbHelper(pageContext);
    upfile.allowUploadFileType="(?:jpg|jpeg|gif|png|bmp|txt|rar|zip|mp3|wav|amr|doc|docx|xsl|xslx|ppt|pptx|jks|JPG|JPEG|GIF|PNG|BMP|TXT|RAR|ZIP|MP3|WAV|AMR|DOC|DOCX|XSL|XSLS|PPT|PPTX|JKS)$";
    upfile.maxFileSize = 1024 * 1024 * 200;
    upfile.Upload();
    out.print("{\"url\":\"" + upfile.fileInfo.url.replace("upfile/", "") + "\",\"fileid\":" + upfile.fileInfo.fileid + ",\"filesize\":" + upfile.fileInfo.filesize + ",\"error\":\"" + upfile.fileInfo.error + "\",\"succeed\":" + (upfile.fileInfo.succeed ? 1 : 0) + ",\"ext\":\"" + upfile.fileInfo.ext + "\",\"filename\":\"" + upfile.fileInfo.filename + "\",\"sourcename\":\"" + upfile.fileInfo.sourcename + "\"}");
%>
